#ifndef OLED_OLED_H_
#define OLED_OLED_H_

#include "stm32f1xx_hal.h"
#include "oledfont.h"
extern I2C_HandleTypeDef  hi2c1;

void OLED_WR_CMD(uint8_t cmd);//向设备写控制命令
void OLED_WR_DATA(uint8_t data);//向设备写控制数据
void OLED_Init(void);//OLED初始化
void OLED_Clear(void);//清屏
void OLED_Display_On(void);//开启OLED显示
void OLED_Display_Off(void);//关闭OLED显示
void OLED_Set_Pos(uint8_t x, uint8_t y);//坐标设置
void OLED_On(void);//更新显示
void OLED_ShowNum(uint8_t x,uint8_t y,unsigned int num,uint8_t len,uint8_t size2,uint8_t Color_Turn);//非负整数显示
void OLED_Showdecimal(uint8_t x,uint8_t y,float num,uint8_t z_len,uint8_t f_len,uint8_t size2, uint8_t Color_Turn);//浮点型数据显示
void OLED_ShowChar(uint8_t x,uint8_t y,uint8_t chr,uint8_t Char_Size,uint8_t Color_Turn);//一个字符显示
void OLED_ShowString(uint8_t x,uint8_t y,char*chr,uint8_t Char_Size,uint8_t Color_Turn);//字符串显示
void OLED_ShowCHinese(uint8_t x,uint8_t y,uint8_t no,uint8_t Color_Turn);//汉字显示
void OLED_DrawBMP(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1, uint8_t *  BMP,uint8_t Color_Turn);//BMP图片显示
void OLED_HorizontalShift(uint8_t direction);//屏幕内容水平全屏滚动播放
void OLED_Some_HorizontalShift(uint8_t direction,uint8_t start,uint8_t end);//屏幕部分内容水平滚动播放
void OLED_VerticalAndHorizontalShift(uint8_t direction);//屏幕内容垂直水平全屏滚动播放
void OLED_DisplayMode(uint8_t mode);//屏幕内容取反显示
void OLED_IntensityControl(uint8_t intensity);//屏幕亮度调节



#endif /* OLED_OLED_H_ */

